package com.activenetwork.smlite.testcase.events.createEvents.basics;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Test;

import com.activenetwork.custom.uielement.UIElement;
import com.activenetwork.custom.uielement.decorate.IdentifierFactory;
import com.activenetwork.smlite.snippet.EventsSnippet;
import com.activenetwork.smlite.testcase.BaseCase;
import com.activenetwork.util.EnvContext;
import com.activenetwork.util.verification.gson.FailurePoint;

public class Basics026 extends BaseCase {
	
	static final Logger logger = LoggerFactory.getLogger(Basics026.class);
	
	
	@Test
	public void Verify_Event_Title_Maximum_length_is_100(){
		loginBusiness.login();
		
		EventsSnippet.gotoAddEventPage();
		UIElement eventTitle = IdentifierFactory.createUIElement("EventBasicSubview", "eventTitle");
		String maxlen = eventTitle.getAttribute("maxlength");
		if(!StringUtils.equals(maxlen, "100")){
			EnvContext.failurePointTL.get().add(
					new FailurePoint(Basics026.class.getName(), 
					"Verify event title max length is 100", 
					"Event title max length is " + maxlen));
		}
		
		loginBusiness.logout();
	}

}
